package com.why.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.repository.query.Param;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author new wei
 * @date 2022/5/19 22:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id;
    private String sex;
    @NotBlank(message = "手机号非空")
    private String telephone;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "生日非空")
    private Date birthday;
    private String username;
    private String password;

}
